/**
 * 所有版权归 广西梧州 陈锦韬 所有
 *
 * @Title: PlfUserInfoForm
 * @Package com.rx.vo
 * @Description: 用户信息表单
 * @author: 陈锦韬
 * @date: 2020\9\8 0008
 * @version V1.0
 * @Copyright: 2020 陈锦韬  All rights reserved.
 */
package com.rx.stock.vo;

import com.baomidou.mybatisplus.annotation.TableField;
import com.rx.core.data.RxData;
import com.rx.core.dbase.RxMarkDbMust;
import com.rx.core.util.RxUtil;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.math.BigDecimal;
import java.util.Date;

/**
 * @author: Administrator
 * @Description: 股票历史成交数据
 * @date: 2020\9\8 0008
 */
@RxData
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
public class StockHistoryInfo extends RxMarkDbMust{
    private static final long serialVersionUID = 1L;


    /**
     * 状态0-正常 1-废弃
     */
    @TableField("STATUS")
    private String status;

    @TableField("SHARE_CODE")
    private String shareCode;

    /**
     * 5日均线
     */
    @TableField("FIVE_AVG")
    private BigDecimal fiveAvg;


    /**
     * 13日均线
     */
    @TableField("THIRTEEN_AVG")
    private BigDecimal thirteenAvg;

    /**
     * 21日均线
     */
    @TableField("TWENTY_ONE_AVG")
    private BigDecimal twentyOneAvg;

    /**
     * 50日成交量均线
     */
    @TableField("FIFTY_AVG")
    private BigDecimal fiftyAvg;

    /**
     * 代码
     */
    @TableField("TRADE_TIME")
    private Date tradeTime;

    /**
     * 开盘价
     */
    @TableField("OPEN_PRICE")
    private BigDecimal openPrice;


    /**
     * 收盘价
     */
    @TableField("CLOSE_PRICE")
    private BigDecimal closePrice;

    /**
     * 最高价
     */
    @TableField("HIGHEST_PRICE")
    private BigDecimal highestPrice;

    /**
     * 最低价
     */
    @TableField("LOWEST_PRICE")
    private BigDecimal lowestPrice;

    /**
     * 换手率
     */
    @TableField("SWITCH_RATE")
    private BigDecimal switchRate;

    /**
     * 成交量
     */
    @TableField("TURN_OVER")
    private BigDecimal turnOver;

    /**
     * 成交额
     */
    @TableField("TURN_AMOUNT")
    private BigDecimal turnAmount;

    /**
     * 涨跌
     */
    @TableField("CHANGE_RATE")
    private BigDecimal changeRate;

    /**
     * 备注
     */
    @TableField("REMARK")
    private String remark;

    /**
     * 5日方向
     */
    @TableField("FIVE_DIRECT")
    private String fiveDirect;
    /**
     * 13日方向
     */
    @TableField("THIRTEEN_DIRECT")
    private String thirteenDirect;
    /**
     * 21日方向
     */
    @TableField("TWENTY_ONE_DIRECT")
    private String twentyOneDirect;
    /**
     * 50日方向
     */
    @TableField("FIFTY_COMPARE")
    private String fiftyCompare;

    /**
     * 标记
     */
    @TableField("OP_FLG")
    private String opFlg;

    @TableField("DIFF_PRICE")
    private BigDecimal diffPrice;

    @TableField("HIGH_PRICE")
    private BigDecimal highPrice;

    @TableField("DIFF_SWITCH")
    private BigDecimal diffSwitch;

    @TableField("AVG_SWITCH")
    private BigDecimal avgSwitch;

    public void copyValue(StockHistoryInfo other){
        Long ver = this.getVer();
        String bid = this.getBid();
        RxUtil.copyProperties(other,this);

        this.setBid(bid);
        this.setVer(ver);
    }
}
